package edu.xmut.kakamusic.viewmodel;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.Transformations;
import androidx.lifecycle.ViewModel;

import com.github.leonardoxh.livedatacalladapter.Resource;

import java.util.List;

import edu.xmut.kakamusic.bean.entity.Video;
import edu.xmut.kakamusic.utils.RequestUtils;

public class VideoViewModel extends ViewModel {
    public LiveData<List<Video>> getVideoList() {
        return Transformations.map(RequestUtils.getInstance().getVideoList(), Resource::getResource);
    }
}
